package com.cumulus.ianerp.ian.auth.menu.action;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.cumulus.ianerp.ian.auth.menu.domain.Menu;
import com.cumulus.ianerp.ian.auth.menu.service.MenuService;

/**
 * 主页左侧菜单查询action
 * @author Ian
 *@date 2017-05-14
 */
@Controller
public class MenuAction {
	
	@Autowired
	private MenuService menuService;
	
	/**
	 * 查询所有菜单选项
	 * Ian
	 *  2017-05-14
	 */
	@RequestMapping("/findTheMenu.action")
	public String findTheMenu(Menu menu,HttpSession session,Model model){
		List<Menu>mList=menuService.findAll(session);
		model.addAttribute("menuList", mList);
		return "/main.jsp";
	}

}
